import {createWebHashHistory,createRouter}  from "vue-router";

import index from '../view/index.vue'
import welcome from'../view/welcome.vue'
import bill from "@/view/bill.vue";
import staff  from "@/view/staff.vue";
import user  from "@/view/user.vue";
import room from "@/view/room.vue";
import room_type from "@/view/room_type.vue";
import reservation from "@/view/reservation.vue";
import billself from "@/view/billself.vue";
import login from '../view/Login.vue';

const routes=[
    {
      path:'/login',

      component: login
    },
  {
    path:'/',
    name:'index',
    component: index,
    children: [
      {path: '/',component: welcome},
      {path: '/bill',component: bill},
      {path: '/staff',component: staff},
        {path: '/room',component: room},
        {path: '/room_type',component: room_type},
        {path: '/billself',component: billself},
        {path: '/reservation',component: reservation},
      {path: '/user',component: user}
    ]
  }
]

const router=createRouter({
  history:createWebHashHistory(),
  routes
})
export default  router;